summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorWolfgang (Wolle) Ewald <wolfgang.ewald@wolles-elektronikkiste.de>2021-05-14 17:32:15 +0200
committerGitHub <noreply@github.com>2021-05-14 17:32:15 +0200
commita1a0dc277e785ce507e4b45a540e259b1b27a296 (patch)
treec4ec99683c5ccf8b41e17927176dbf3164e6bde3 /examples
parentUpdate Alert_Window_Mode_with_Latch.ino (diff)
downloadADS1115_WE-a1a0dc277e785ce507e4b45a540e259b1b27a296.tar
ADS1115_WE-a1a0dc277e785ce507e4b45a540e259b1b27a296.tar.gz
ADS1115_WE-a1a0dc277e785ce507e4b45a540e259b1b27a296.tar.bz2
ADS1115_WE-a1a0dc277e785ce507e4b45a540e259b1b27a296.tar.lz
ADS1115_WE-a1a0dc277e785ce507e4b45a540e259b1b27a296.tar.xz
ADS1115_WE-a1a0dc277e785ce507e4b45a540e259b1b27a296.tar.zst
ADS1115_WE-a1a0dc277e785ce507e4b45a540e259b1b27a296.zip
Diffstat (limited to 'examples')
-rw-r--r--examples/Auto_Range/Auto_Range.ino10
1 files changed, 8 insertions, 2 deletions
diff --git a/examples/Auto_Range/Auto_Range.ino b/examples/Auto_Range/Auto_Range.ino
index 31d494e..0cbce88 100644
--- a/examples/Auto_Range/Auto_Range.ino
+++ b/examples/Auto_Range/Auto_Range.ino
@@ -13,8 +13,14 @@
#include<Wire.h>
#define I2C_ADDRESS 0x48
-ADS1115_WE adc(I2C_ADDRESS);
-// ADS1115_WE adc = ADS1115_WE(); // Alternative: uses default address 0x48
+/* There are several ways to create your ADS1115_WE object:
+ * ADS1115_WE adc = ADS1115_WE() -> uses Wire / I2C Address = 0x48
+ * ADS1115_WE adc = ADS1115_WE(I2C_ADDRESS) -> uses Wire / I2C_ADDRESS
+ * ADS1115_WE adc = ADS1115_WE(&wire2) -> uses the TwoWire object wire2 / I2C_ADDRESS
+ * ADS1115_WE adc = ADS1115_WE(&wire2, I2C_ADDRESS) -> all together
+ * Successfully tested with two I2C busses on an ESP32
+ */
+ADS1115_WE adc = ADS1115_WE(I2C_ADDRESS);
void setup() {
Wire.begin();